A cache memory is provided to efficiently use a memory in a computer system. Typically, it is a memory which is located between a processor core and a main memory, operates more quickly than the main memory, and is smaller than the main memory.
Since data accessed by the processor core generally has a strong possibility of being accessed again soon, the data accessed by the processor core may be stored in the cache memory and may be quickly accessed when an access request occurs again.
In this instance, when the data requested by the processor core is stored in the cache memory, the processor core may quickly access the data requested from the cache memory instead of the main memory, thereby reducing an operation time.
Conversely, when the data requested by the processor core is not stored in the cache memory, the processor core needs to access the data requested from the main memory instead of the cache memory, and a time required for this process may be longer than a time required for accessing the data from the cache memory.
As described above, a case where the data requested by the processor core is stored in the cache memory denotes that a cache hit occurs, and a case where the data requested by the processor core is not stored in the cache memory denotes that a cache miss occurs.
A Scratch Pad Memory (SPM) may used as a memory device being combined with the processor core and storing the data.
The SPM may exclude an additional circuit for determining either a hit or a miss, different from that of the cache memory, and is controlled by legacy software for correct operation of the SPM.
Selection, configuration, and use of at least one of a cache and the SPM may be different according to a processor architecture.
Accordingly, there is a need for a processor architecture including a cache and a SPM, enabling correct operations of the cache and the SPM, and a memory control method.